home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / DigitalSignature.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  18.5 KB  |  500 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DigitalSignature.a
  3. ;
  4. ;    Contains:    Digital Signature Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DIGITALSIGNATURE__') = 'UNDEFINED' THEN
  18. __DIGITALSIGNATURE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29.  
  30. ;  values of SIGNameAttributeType 
  31.  
  32. kSIGCountryCode                    EQU        0
  33. kSIGOrganization                EQU        1
  34. kSIGStreetAddress                EQU        2
  35. kSIGState                        EQU        3
  36. kSIGLocality                    EQU        4
  37. kSIGCommonName                    EQU        5
  38. kSIGTitle                        EQU        6
  39. kSIGOrganizationUnit            EQU        7
  40. kSIGPostalCode                    EQU        8
  41. ; typedef unsigned short                 SIGNameAttributeType
  42.  
  43. ;  
  44. ;Certificate status codes returned in SIGCertInfo or SIGSignerInfo from
  45. ;either SIGGetCertInfo or SIGGetSignerInfo respectively. kSIGValid means that
  46. ;the certificate is currently valid. kSIGPending means the certificate is
  47. ;currently not valid - but will be.  kSIGExpired means the certificate has
  48. ;expired. A time is always associated with a SIGCertStatus.  In each case the
  49. ;time has a specific interpretation.  When the status is kSIGValid the time is
  50. ;when the certificate will expire. When the status is kSIGPending the time is
  51. ;when the certificate will become valid. When the status is kSIGExpired the time
  52. ;is when the certificate expired. In the SIGCertInfo structure, the startDate
  53. ;and endDate fields hold the appropriate date information.  In the SIGSignerInfo
  54. ;structure, this information is provided in the certSetStatusTime field. In the
  55. ;SIGSignerInfo struct, the status time is actually represented by the SIGSignatureStatus
  56. ;field which can contain any of the types below. NOTE: The only time you will get 
  57. ;a kSIGInvalid status is when it pertains to a SIGSignatureStatus field and only when
  58. ;you get a signature that was created after the certificates expiration date, something
  59. ;we are not allowing on the Mac but that may not be restricted on other platforms. Also, 
  60. ;it will not be possible to get a kSIGPending value for SIGSignatureStatus on the Mac but
  61. ;possibly allowed by other platforms.
  62. ;
  63.  
  64. ;  Values for SIGCertStatus or SIGSignatureStatus 
  65.  
  66. kSIGValid                        EQU        0                    ; possible for either a SIGCertStatus or SIGSignatureStatus 
  67. kSIGPending                        EQU        1                    ; possible for either a SIGCertStatus or SIGSignatureStatus 
  68. kSIGExpired                        EQU        2                    ; possible for either a SIGCertStatus or SIGSignatureStatus * possible only for a SIGSignatureStatus 
  69. kSIGInvalid                        EQU        3
  70. ; typedef unsigned short                 SIGCertStatus
  71.  
  72. ; typedef unsigned short                 SIGSignatureStatus
  73.  
  74. ;  Number of bytes needed for a digest record when using SIGDigest 
  75.  
  76. kSIGDigestSize                    EQU        16
  77. SIGDigestData            RECORD 0
  78. elements                 ds.b    16
  79. sizeof                     EQU *                    ; size:   $10 (16)
  80.                         ENDR
  81.  
  82.  
  83. ; typedef Byte *                        SIGDigestDataPtr
  84.  
  85. SIGCertInfo                RECORD 0
  86. startDate                 ds.l    1                ; offset: $0 (0)        ;  cert start validity date 
  87. endDate                     ds.l    1                ; offset: $4 (4)        ;  cert end validity date 
  88. certStatus                 ds.w    1                ; offset: $8 (8)        ;  see comment on SIGCertStatus for definition 
  89. certAttributeCount         ds.l    1                ; offset: $A (10)        ;  number of name attributes in this cert 
  90. issuerAttributeCount     ds.l    1                ; offset: $E (14)        ;  number of name attributes in this certs issuer 
  91. serialNumber             ds        Str255            ; offset: $12 (18)        ;  cert serial number 
  92. sizeof                     EQU *                    ; size:   $112 (274)
  93.                         ENDR
  94. ; typedef struct SIGCertInfo *            SIGCertInfoPtr
  95.  
  96. SIGSignerInfo            RECORD 0
  97. signingTime                 ds.l    1                ; offset: $0 (0)        ;  time of signing 
  98. certCount                 ds.l    1                ; offset: $4 (4)        ;  number of certificates in the cert set 
  99. certSetStatusTime         ds.l    1                ; offset: $8 (8)        ;  Worst cert status time. See comment on SIGCertStatus for definition 
  100. signatureStatus             ds.w    1                ; offset: $C (12)        ;  The status of the signature. See comment on SIGCertStatus for definition
  101. sizeof                     EQU *                    ; size:   $E (14)
  102.                         ENDR
  103. ; typedef struct SIGSignerInfo *        SIGSignerInfoPtr
  104.  
  105. SIGNameAttributesInfo    RECORD 0
  106. onNewLevel                 ds.b    1                ; offset: $0 (0)
  107. filler1                     ds.b    1                ; offset: $1 (1)
  108. attributeType             ds.w    1                ; offset: $2 (2)
  109. attributeScript             ds.w    1                ; offset: $4 (4)
  110. attribute                 ds        Str255            ; offset: $6 (6)
  111. sizeof                     EQU *                    ; size:   $106 (262)
  112.                         ENDR
  113. ; typedef struct SIGNameAttributesInfo * SIGNameAttributesInfoPtr
  114.  
  115. ; typedef Ptr                             SIGContextPtr
  116.  
  117. ; typedef Ptr                             SIGSignaturePtr
  118.  
  119. ;Certificates are always in order. That is, the signers cert is always 0, the
  120. ;issuer of the signers cert is always 1 etc… to the number of certificates-1.
  121. ;You can use this constant for readability in your code.
  122. ;
  123.  
  124.  
  125. kSIGSignerCertIndex                EQU        0
  126. ;Call back procedure supplied by developer, return false to cancel the current
  127. ;process.
  128. ;
  129.  
  130. ;Resource id's of standard signature icon suite, all sizes and colors are available.
  131. ;
  132.  
  133.  
  134. kSIGSignatureIconResID            EQU        -16797
  135. kSIGValidSignatureIconResID        EQU        -16799
  136. kSIGInvalidSignatureIconResID    EQU        -16798
  137. ;  ——————————————————————————————— CONTEXT CALLS ——————————————————————————————— 
  138. ;To use the Digital Signature toolbox you will need a SIGContextPtr.  To create
  139. ;a SIGContextPtr you simply call SIGNewContext and it will create and initialize
  140. ;a context for you.  To free the memory occupied by the context and invalidate
  141. ;its internal data, call SIGDisposeContext. An initialized context has no notion
  142. ;of the type of operation it will be performing however, once you call
  143. ;SIGSignPrepare SIGVerifyPrepare, or SIGDigestPrepare, the contexts operation
  144. ;type is set and to switch  to another type of operation will require creating a
  145. ;new context. Be sure to pass the same context to corresponding toolbox calls
  146. ;(ie SIGSignPrepare, SIGProcessData, SIGSign)  in other words mixing lets say
  147. ;signing and verify calls with the same context is not allowed.
  148. ;
  149.  
  150. ;
  151. ; pascal OSErr SIGNewContext(SIGContextPtr *context)
  152. ;
  153.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  154.         Macro
  155.         _SIGNewContext
  156.             move.l              #$0002076C,D0
  157.             dc.w                $AA5D
  158.         EndM
  159.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  160.         IMPORT_CFM_FUNCTION SIGNewContext
  161.     ENDIF
  162.  
  163. ;
  164. ; pascal OSErr SIGDisposeContext(SIGContextPtr context)
  165. ;
  166.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  167.         Macro
  168.         _SIGDisposeContext
  169.             move.l              #$0002076D,D0
  170.             dc.w                $AA5D
  171.         EndM
  172.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  173.         IMPORT_CFM_FUNCTION SIGDisposeContext
  174.     ENDIF
  175.  
  176.  
  177. ;  ——————————————————————————————— SIGNING CALLS ——————————————————————————————— 
  178. ;Once you have created a SIGContextPtr, you create a signature by calling
  179. ;SIGSignPrepare once, followed by n calls to SIGProcessData, followed by one call
  180. ;toRcpt SIGSign. To create another signature on different data but for the same
  181. ;signer, don't dispose of the context and call SIGProcessData for the new data
  182. ;followed by a call SIGSign again. In this case the signer will not be prompted
  183. ;for their signer and password again as it was already provided.  Once you call
  184. ;SIGDisposeContext, all signer information will be cleared out of the context and
  185. ;the signer will be re-prompted.  The signer file FSSpecPtr should be set to nil
  186. ;if you want the toolbox to use the last signer by default or prompt for a signer
  187. ;if none exists.  The prompt parameter can be used to pass a string to be displayed
  188. ;in the dialog that prompts the user for their password.  If the substring "^1"
  189. ;(without the quotes) is in the prompt string, then the toolbox will replace it
  190. ;with the name of the signer from the signer selected by the user.  If an empty
  191. ;string is passed, the following default string will be sent to the toolbox
  192. ;"\pSigning as ^1.".  You can call any of the utility routines after SIGSignPrepare
  193. ;or SIGSign to get information about the signer or certs.
  194. ;
  195.  
  196. ;
  197. ; pascal OSErr SIGSignPrepare(SIGContextPtr context, const FSSpec *signerFile, ConstStr255Param prompt, Size *signatureSize)
  198. ;
  199.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  200.         Macro
  201.         _SIGSignPrepare
  202.             move.l              #$0008076E,D0
  203.             dc.w                $AA5D
  204.         EndM
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION SIGSignPrepare
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal OSErr SIGSign(SIGContextPtr context, SIGSignaturePtr signature, SIGStatusUPP statusProc)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         Macro
  214.         _SIGSign
  215.             move.l              #$0006076F,D0
  216.             dc.w                $AA5D
  217.         EndM
  218.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  219.         IMPORT_CFM_FUNCTION SIGSign
  220.     ENDIF
  221.  
  222.  
  223. ;  ——————————————————————————————— VERIFYING CALLS ——————————————————————————————— 
  224. ;Once you have created a SIGContextPtr, you verify a signature by calling
  225. ;SIGVerifyPrepare  once, followed by n calls to SIGProcessData, followed by one
  226. ;call to SIGVerify. Check the return code from SIGVerify to see if the signature
  227. ;verified or not (noErr is returned on  success otherwise the appropriate error
  228. ;code).  Upon successfull verification, you can call any of the utility routines
  229. ;toRcpt find out who signed the data.
  230. ;
  231.  
  232. ;
  233. ; pascal OSErr SIGVerifyPrepare(SIGContextPtr context, SIGSignaturePtr signature, Size signatureSize, SIGStatusUPP statusProc)
  234. ;
  235.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  236.         Macro
  237.         _SIGVerifyPrepare
  238.             move.l              #$00080770,D0
  239.             dc.w                $AA5D
  240.         EndM
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION SIGVerifyPrepare
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal OSErr SIGVerify(SIGContextPtr context)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         Macro
  250.         _SIGVerify
  251.             move.l              #$00020771,D0
  252.             dc.w                $AA5D
  253.         EndM
  254.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION SIGVerify
  256.     ENDIF
  257.  
  258. ;  —————————————————————————————— DIGESTING CALLS —————————————————————————————— 
  259. ;Once you have created a SIGContextPtr, you create a digest by calling
  260. ;SIGDigestPrepare once, followed by n calls to SIGProcessData, followed by one
  261. ;call to SIGDigest.  You can dispose of the context after SIGDigest as the
  262. ;SIGDigestData does not reference back into it.  SIGDigest returns the digest in
  263. ;digest.
  264. ;
  265.  
  266. ;
  267. ; pascal OSErr SIGDigestPrepare(SIGContextPtr context)
  268. ;
  269.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  270.         Macro
  271.         _SIGDigestPrepare
  272.             move.l              #$00020772,D0
  273.             dc.w                $AA5D
  274.         EndM
  275.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  276.         IMPORT_CFM_FUNCTION SIGDigestPrepare
  277.     ENDIF
  278.  
  279. ;
  280. ; pascal OSErr SIGDigest(SIGContextPtr context, SIGDigestData digest)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  283.         Macro
  284.         _SIGDigest
  285.             move.l              #$00040773,D0
  286.             dc.w                $AA5D
  287.         EndM
  288.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  289.         IMPORT_CFM_FUNCTION SIGDigest
  290.     ENDIF
  291.  
  292.  
  293. ;  —————————————————————————————— PROCESSING DATA —————————————————————————————— 
  294. ;To process data during a digest, sign, or verify operation call SIGProcessData
  295. ;as many times as necessary and with any sized blocks of data.  The data needs to
  296. ;be processed in the same order during corresponding sign and verify operations
  297. ;but does not need to be processed in the same sized chunks (i.e., the toolbox
  298. ;just sees it as a continuous bit stream).
  299. ;
  300.  
  301. ;
  302. ; pascal OSErr SIGProcessData(SIGContextPtr context, const void *data, Size dataSize)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  305.         Macro
  306.         _SIGProcessData
  307.             move.l              #$00060774,D0
  308.             dc.w                $AA5D
  309.         EndM
  310.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  311.         IMPORT_CFM_FUNCTION SIGProcessData
  312.     ENDIF
  313.  
  314.  
  315. ;  ——————————————————————————————— UTILITY CALLS ——————————————————————————————— 
  316. ;Given a context that has successfully performed a verification SIGShowSigner
  317. ;will  display a modal dialog with the entire distinguished name of the person
  318. ;who signed the data. the prompt (if supplied) will appear at the top of the
  319. ;dialog.  If no prompt is specified, the default prompt "\pVerification
  320. ;Successfull." will appear.
  321. ;
  322. ;Given a context that has been populated by calling SIGSignPrepare, SIGSign or a
  323. ;successful SIGVerify, you can make the remaining utility calls:
  324. ;
  325. ;SIGGetSignerInfo will return the SignerInfo record.  The certCount can be used
  326. ;toRcpt index into the certificate set when calling SIGGetCertInfo,
  327. ;SIGGetCertNameAttributes or SIGGetCertIssuerNameAttributes. The signingTime is
  328. ;only defined if the call is made after SIGSign  or SIGVerify. The certSetStatus
  329. ;will tell you the best status of the entire certificate set while
  330. ;certSetStatusTime will correspond to the time associated with that status (see
  331. ;definitions above).
  332. ;
  333. ;SIGGetCertInfo will return the SIGCertInfo record when given a valid index into
  334. ;the cert set in  certIndex.  Note: The cert at index kSIGSignerCertIndex is
  335. ;always the signers certificate.  The  serial number, start date and end date
  336. ;are there should you wish to display that info.  The  certAttributeCount and
  337. ;issuerAttributeCount provide the number of parts in the name of that certificate
  338. ;or that certificates issuer respectively.  You use these numbers to index into
  339. ;either SIGGetCertNameAttributes or SIGGetCertIssuerNameAttributes to retrieve
  340. ;the name. The certStatus will tell you the status of the certificate while
  341. ;certStatusTime will correspond to the time associated with that status (see
  342. ;definitions above).
  343. ;
  344. ;SIGGetCertNameAttributes and SIGGetCertIssuerNameAttributes return name parts
  345. ;of the certificate at  certIndex and attributeIndex.  The newLevel return value
  346. ;tells you wether the name attribute returned is at the same level in the name
  347. ;hierarchy as the previous attribute.  The type return value tells you  the type
  348. ;of attribute returned. nameAttribute is the actual string containing the name
  349. ;attribute.   So, if you wanted to display the entire distinguished name of the
  350. ;person who's signature was just validated you could do something like this;
  351. ;
  352. ;    (…… variable declarations and verification code would preceed this sample ……)
  353. ;
  354. ;    error = SIGGetCertInfo(verifyContext, kSIGSignerCertIndex, &certInfo);
  355. ;    HandleErr(error);
  356. ;
  357. ;    for (i = 0; i <= certInfo.certAttributeCount-1; i++)
  358. ;        {
  359. ;        error = SIGGetCertNameAttributes(
  360. ;            verifyContext, kSIGSignerCertIndex, i, &newLevel, &type, theAttribute);
  361. ;        HandleErr(error);
  362. ;        DisplayNamePart(theAttribute, type, newLevel);
  363. ;        }
  364. ;
  365.  
  366. ;
  367. ; pascal OSErr SIGShowSigner(SIGContextPtr context, ConstStr255Param prompt)
  368. ;
  369.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  370.         Macro
  371.         _SIGShowSigner
  372.             move.l              #$00040775,D0
  373.             dc.w                $AA5D
  374.         EndM
  375.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  376.         IMPORT_CFM_FUNCTION SIGShowSigner
  377.     ENDIF
  378.  
  379. ;
  380. ; pascal OSErr SIGGetSignerInfo(SIGContextPtr context, SIGSignerInfo *signerInfo)
  381. ;
  382.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  383.         Macro
  384.         _SIGGetSignerInfo
  385.             move.l              #$00040776,D0
  386.             dc.w                $AA5D
  387.         EndM
  388.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  389.         IMPORT_CFM_FUNCTION SIGGetSignerInfo
  390.     ENDIF
  391.  
  392. ;
  393. ; pascal OSErr SIGGetCertInfo(SIGContextPtr context, unsigned long certIndex, SIGCertInfo *certInfo)
  394. ;
  395.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  396.         Macro
  397.         _SIGGetCertInfo
  398.             move.l              #$00060777,D0
  399.             dc.w                $AA5D
  400.         EndM
  401.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION SIGGetCertInfo
  403.     ENDIF
  404.  
  405. ;
  406. ; pascal OSErr SIGGetCertNameAttributes(SIGContextPtr context, unsigned long certIndex, unsigned long attributeIndex, SIGNameAttributesInfo *attributeInfo)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         Macro
  410.         _SIGGetCertNameAttributes
  411.             move.l              #$00080778,D0
  412.             dc.w                $AA5D
  413.         EndM
  414.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION SIGGetCertNameAttributes
  416.     ENDIF
  417.  
  418. ;
  419. ; pascal OSErr SIGGetCertIssuerNameAttributes(SIGContextPtr context, unsigned long certIndex, unsigned long attributeIndex, SIGNameAttributesInfo *attributeInfo)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  422.         Macro
  423.         _SIGGetCertIssuerNameAttributes
  424.             move.l              #$00080779,D0
  425.             dc.w                $AA5D
  426.         EndM
  427.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  428.         IMPORT_CFM_FUNCTION SIGGetCertIssuerNameAttributes
  429.     ENDIF
  430.  
  431.  
  432.  
  433. ;  ——————————————————————————— FILE SIGN & VERIFY CALLS —————————————————————————— 
  434. ;These calls allow you to detect the presence of a standard signtaure in a file as 
  435. ;well as sign and verify files in a standard way.  An example of this is the Finder, 
  436. ;which uses these calls to allow the user to "drop sign" a file.
  437. ;
  438. ;To detect if a file is signed in the standard way, pass the FSSpec of the file to SIGFileIsSigned.
  439. ;A result of noErr means the file is in fact signed, otherwise, a kSIGNoSignature error will
  440. ;be returned.
  441. ;
  442. ;Once you have created a SIGContextPtr, you can make calls to either sign or verify a file in
  443. ;a standard way: 
  444. ;
  445. ;To sign a file, call SIGSignPrepare followed by 'n' number of calls to SIGSignFile,
  446. ;passing it the file spec for each file you wish to sign in turn.  You supply the context, the signature 
  447. ;size that was returned from SIGSignPrepare and an optional call back proc.  The call will take care of all
  448. ;the processing of data and affixing the signature to the file. If a signature already exists in the file, 
  449. ;it is replaced with the newly created signature.
  450. ;
  451. ;To verify a file that was signed using SIGSignFile, call SIGVerifyFile passing it a new context and 
  452. ;the file spec.  Once this call has completed, if the verification is successfull, you can pass the context 
  453. ;to SIGShowSigner to display the name of the person who signed the file.
  454. ;
  455.  
  456. ;
  457. ; pascal OSErr SIGFileIsSigned(const FSSpec *fileSpec)
  458. ;
  459.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  460.         Macro
  461.         _SIGFileIsSigned
  462.             move.l              #$000209C4,D0
  463.             dc.w                $AA5D
  464.         EndM
  465.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  466.         IMPORT_CFM_FUNCTION SIGFileIsSigned
  467.     ENDIF
  468.  
  469. ;
  470. ; pascal OSErr SIGSignFile(SIGContextPtr context, Size signatureSize, const FSSpec *fileSpec, SIGStatusUPP statusProc)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  473.         Macro
  474.         _SIGSignFile
  475.             move.l              #$000809C5,D0
  476.             dc.w                $AA5D
  477.         EndM
  478.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION SIGSignFile
  480.     ENDIF
  481.  
  482. ;
  483. ; pascal OSErr SIGVerifyFile(SIGContextPtr context, const FSSpec *fileSpec, SIGStatusUPP statusProc)
  484. ;
  485.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  486.         Macro
  487.         _SIGVerifyFile
  488.             move.l              #$000609C6,D0
  489.             dc.w                $AA5D
  490.         EndM
  491.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION SIGVerifyFile
  493.     ENDIF
  494.  
  495.     ENDIF ; __DIGITALSIGNATURE__ 
  496.  
  497.